

<?php 
    if($template->get('aProduct')){$aProduct = $template->get('aProduct'); ?>
    <div class="item small_product_layout">
        <div class="item_swap">
            <div class="image_content">
                <a href="<?php echo $aProduct['uri']; ?>"><img src="<?php echo URL::getLink('upload/'.$aProduct['image']); ?>" alt=""></a>
            </div>
            <div class="item_info">
                <h3><?php echo $aProduct['price']; ?> VND</h3>
                <h2><a href="<?php echo $aProduct['uri']; ?>"><?php if(strlen($aProduct['name']) > 20){echo substr($aProduct['name'],0,20).'';}else{ echo $aProduct['name'];} ?></a></h2>
                <p><?php if(strlen($aProduct['description']) > 60){echo substr($aProduct['description'],0,60).' ...';}else{ echo $aProduct['description'];} ?></p>
            </div>
            <div class="total_view_panel">120 view</div>
            <?php echo ($template->get('title') ? '<div class="item_title">'. $template->get('title').'</div>' : ''); ?>
        </div>
    </div>
<?php }?>